home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3t / termios.z / termios
Encoding:
Text File  |  1998-10-20  |  27.9 KB  |  391 lines

  1.  
  2.  
  3.  
  4. tttteeeerrrrmmmmiiiioooossss((((3333tttt))))                                                        tttteeeerrrrmmmmiiiioooossss((((3333tttt))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss: _tttt_cccc_gggg_eeee_tttt_aaaa_tttt_tttt_rrrr, _tttt_cccc_ssss_eeee_tttt_aaaa_tttt_tttt_rrrr, _tttt_cccc_ssss_eeee_nnnn_dddd_bbbb_rrrr_eeee_aaaa_kkkk, _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn, _tttt_cccc_ffff_llll_uuuu_ssss_hhhh, _tttt_cccc_ffff_llll_oooo_wwww,
  10.      _cccc_ffff_gggg_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd, _cccc_ffff_gggg_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd, _cccc_ffff_ssss_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd, _cccc_ffff_ssss_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd, _tttt_cccc_gggg_eeee_tttt_pppp_gggg_rrrr_pppp, _tttt_cccc_ssss_eeee_tttt_pppp_gggg_rrrr_pppp,
  11.      _tttt_cccc_gggg_eeee_tttt_ssss_iiii_dddd - general terminal interface
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss_...._hhhh_>>>>
  15.      _iiii_nnnn_tttt _tttt_cccc_gggg_eeee_tttt_aaaa_tttt_tttt_rrrr_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss _****_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss______pppp_))))_;;;;
  16.      _iiii_nnnn_tttt _tttt_cccc_ssss_eeee_tttt_aaaa_tttt_tttt_rrrr_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _iiii_nnnn_tttt _oooo_pppp_tttt_iiii_oooo_nnnn_aaaa_llll______aaaa_cccc_tttt_iiii_oooo_nnnn_ssss_,,,,
  17.           _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss _****_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss______pppp_))))_;;;;
  18.      _iiii_nnnn_tttt _tttt_cccc_ssss_eeee_nnnn_dddd_bbbb_rrrr_eeee_aaaa_kkkk_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _iiii_nnnn_tttt _dddd_uuuu_rrrr_aaaa_tttt_iiii_oooo_nnnn_))))_;;;;
  19.      _iiii_nnnn_tttt _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_))))_;;;;
  20.      _iiii_nnnn_tttt _tttt_cccc_ffff_llll_uuuu_ssss_hhhh_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _iiii_nnnn_tttt _qqqq_uuuu_eeee_uuuu_eeee______ssss_eeee_llll_eeee_cccc_tttt_oooo_rrrr_))))_;;;;
  21.      _iiii_nnnn_tttt _tttt_cccc_ffff_llll_oooo_wwww_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _iiii_nnnn_tttt _aaaa_cccc_tttt_iiii_oooo_nnnn_))))_;;;;
  22.      _ssss_pppp_eeee_eeee_dddd______tttt _cccc_ffff_gggg_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd_((((_ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss _****_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss______pppp_))))_;;;;
  23.      _iiii_nnnn_tttt _cccc_ffff_ssss_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd_((((_cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss _****_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss______pppp_,,,, _ssss_pppp_eeee_eeee_dddd______tttt _ssss_pppp_eeee_eeee_dddd_))))_;;;;
  24.      _ssss_pppp_eeee_eeee_dddd______tttt _cccc_ffff_gggg_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd_((((_ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss _****_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss______pppp_))))_;;;;
  25.      _iiii_nnnn_tttt _cccc_ffff_ssss_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd_((((_cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss _****_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss______pppp_,,,, _ssss_pppp_eeee_eeee_dddd______tttt _ssss_pppp_eeee_eeee_dddd_))))_;;;;
  26.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  27.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
  28.  
  29.      _pppp_iiii_dddd______tttt _tttt_cccc_gggg_eeee_tttt_pppp_gggg_rrrr_pppp_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_))))_;;;;
  30.      _iiii_nnnn_tttt _tttt_cccc_ssss_eeee_tttt_pppp_gggg_rrrr_pppp_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _pppp_iiii_dddd______tttt _pppp_gggg_iiii_dddd_))))_;;;;
  31.      _pppp_iiii_dddd______tttt _tttt_cccc_gggg_eeee_tttt_ssss_iiii_dddd_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_))))_;;;;
  32.  
  33. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  34.      These functions describe a general terminal interface for controlling
  35.      asynchronous communications ports.  A more detailed overview of the
  36.      terminal interface can be found in _tttt_eeee_rrrr_mmmm_iiii_oooo(7), which also describes an
  37.      _iiii_oooo_cccc_tttt_llll(2) interface that provides the same functionality.  However, the
  38.      function interface described here is the preferred user interface.
  39.  
  40.      Many of the functions described here have a _t_e_r_m_i_o_s__p argument that is a
  41.      pointer to a _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure.  This structure contains the following
  42.      members:
  43.  
  44.           _tttt_cccc_ffff_llll_aaaa_gggg______tttt   _cccc______iiii_ffff_llll_aaaa_gggg_;;;;        _////_**** _iiii_nnnn_pppp_uuuu_tttt _mmmm_oooo_dddd_eeee_ssss _****_////
  45.           _tttt_cccc_ffff_llll_aaaa_gggg______tttt   _cccc______oooo_ffff_llll_aaaa_gggg_;;;;        _////_**** _oooo_uuuu_tttt_pppp_uuuu_tttt _mmmm_oooo_dddd_eeee_ssss _****_////
  46.           _tttt_cccc_ffff_llll_aaaa_gggg______tttt   _cccc______cccc_ffff_llll_aaaa_gggg_;;;;        _////_**** _cccc_oooo_nnnn_tttt_rrrr_oooo_llll _mmmm_oooo_dddd_eeee_ssss _****_////
  47.           _tttt_cccc_ffff_llll_aaaa_gggg______tttt   _cccc______llll_ffff_llll_aaaa_gggg_;;;;        _////_**** _llll_oooo_cccc_aaaa_llll _mmmm_oooo_dddd_eeee_ssss _****_////
  48.           _ssss_pppp_eeee_eeee_dddd______tttt    _cccc______oooo_ssss_pppp_eeee_eeee_dddd_;;;;       _////_**** _oooo_uuuu_tttt_pppp_uuuu_tttt _ssss_pppp_eeee_eeee_dddd _****_////
  49.           _ssss_pppp_eeee_eeee_dddd______tttt    _cccc______iiii_ssss_pppp_eeee_eeee_dddd_;;;;       _////_**** _iiii_nnnn_pppp_uuuu_tttt _ssss_pppp_eeee_eeee_dddd_;;;; _nnnn_oooo_tttt _ssss_uuuu_pppp_pppp_oooo_rrrr_tttt_eeee_dddd _****_////
  50.           _cccc_cccc______tttt       _cccc______cccc_cccc_[[[[_NNNN_CCCC_CCCC_SSSS_]]]]_;;;;     _////_**** _cccc_oooo_nnnn_tttt_rrrr_oooo_llll _cccc_hhhh_aaaa_rrrr_ssss _****_////
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                                                                         PPPPaaaaggggeeee 1111
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. tttteeeerrrrmmmmiiiioooossss((((3333tttt))))                                                        tttteeeerrrrmmmmiiiioooossss((((3333tttt))))
  64.  
  65.  
  66.  
  67.      These structure members are described in detail in _tttt_eeee_rrrr_mmmm_iiii_oooo(_7).
  68.  
  69.    GGGGeeeetttt aaaannnndddd SSSSeeeetttt TTTTeeeerrrrmmmmiiiinnnnaaaallll AAAAttttttttrrrriiiibbbbuuuutttteeeessss
  70.      The _tttt_cccc_gggg_eeee_tttt_aaaa_tttt_tttt_rrrr function gets the parameters associated with the object
  71.      referred by _f_i_l_d_e_s and stores them in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure referenced by
  72.      _t_e_r_m_i_o_s__p.  This function may be invoked from a background process;
  73.      however, the terminal attributes may be subsequently changed by a
  74.      foreground process.
  75.  
  76.      The _tttt_cccc_ssss_eeee_tttt_aaaa_tttt_tttt_rrrr function sets the parameters associated with the terminal
  77.      (unless support is required from the underlying hardware that is not
  78.      available) from the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure referenced by _t_e_r_m_i_o_s__p as follows:
  79.  
  80.           If _o_p_t_i_o_n_a_l__a_c_t_i_o_n_s is _TTTT_CCCC_SSSS_AAAA_NNNN_OOOO_WWWW, the change occurs immediately.
  81.  
  82.           If _o_p_t_i_o_n_a_l__a_c_t_i_o_n_s is _TTTT_CCCC_SSSS_AAAA_DDDD_RRRR_AAAA_IIII_NNNN, the change occurs after all output
  83.           written to _f_i_l_d_e_s has been transmitted.  This function should be
  84.           used when changing parameters that affect output.
  85.  
  86.           If _o_p_t_i_o_n_a_l__a_c_t_i_o_n_s is _TTTT_CCCC_SSSS_AAAA_FFFF_LLLL_UUUU_SSSS_HHHH, the change occurs after all output
  87.           written to the object referred by _f_i_l_d_e_s has been transmitted, and
  88.           all input that has been received but not read is discarded before
  89.           the change is made.
  90.  
  91.      The symbolic constants for the values of _o_p_t_i_o_n_a_l__a_c_t_i_o_n_s are defined in
  92.      _<<<<_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss_...._hhhh_>>>>.
  93.  
  94.    LLLLiiiinnnneeee CCCCoooonnnnttttrrrroooollll
  95.      If the terminal is using asynchronous serial data transmission, the
  96.      _tttt_cccc_ssss_eeee_nnnn_dddd_bbbb_rrrr_eeee_aaaa_kkkk function causes transmission of a continuous stream of zero-
  97.      valued bits for a specific duration.  If _d_u_r_a_t_i_o_n is zero, it causes
  98.      transmission of zero-valued bits for at least 0.25 seconds, and not more
  99.      than 0.5 seconds.  If _d_u_r_a_t_i_o_n is not zero, it behaves in a way similar
  100.      to _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn.
  101.  
  102.      If the terminal is not using asynchronous serial data transmission, the
  103.      _tttt_cccc_ssss_eeee_nnnn_dddd_bbbb_rrrr_eeee_aaaa_kkkk function sends data to generate a break condition or returns
  104.      without taking any action.
  105.  
  106.      The _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn function waits until all output written to the object
  107.      referred to by _f_i_l_d_e_s has been transmitted.
  108.  
  109.      The _tttt_cccc_ffff_llll_uuuu_ssss_hhhh function discards data written to the object referred to by
  110.      _f_i_l_d_e_s but not transmitted, or data received but not read, depending on
  111.      the value of _q_u_e_u_e__s_e_l_e_c_t_o_r:
  112.  
  113.           If _q_u_e_u_e__s_e_l_e_c_t_o_r is _TTTT_CCCC_IIII_FFFF_LLLL_UUUU_SSSS_HHHH, it flushes data received but not
  114.           read.
  115.  
  116.           If _q_u_e_u_e__s_e_l_e_c_t_o_r is _TTTT_CCCC_OOOO_FFFF_LLLL_UUUU_SSSS_HHHH, it flushes data written but not
  117.           transmitted.
  118.  
  119.  
  120.  
  121.  
  122.                                                                         PPPPaaaaggggeeee 2222
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. tttteeeerrrrmmmmiiiioooossss((((3333tttt))))                                                        tttteeeerrrrmmmmiiiioooossss((((3333tttt))))
  130.  
  131.  
  132.  
  133.           If _q_u_e_u_e__s_e_l_e_c_t_o_r is _TTTT_CCCC_IIII_OOOO_FFFF_LLLL_UUUU_SSSS_HHHH, it flushes both data received but
  134.           not read, and data written but not transmitted.
  135.  
  136.      The _tttt_cccc_ffff_llll_oooo_wwww function suspends transmission or reception of data on the
  137.      object referred to by _f_i_l_d_e_s, depending on the value of _a_c_t_i_o_n:
  138.  
  139.           If _a_c_t_i_o_n is _TTTT_CCCC_OOOO_OOOO_FFFF_FFFF, it suspends output.
  140.  
  141.           If _a_c_t_i_o_n is _TTTT_CCCC_OOOO_OOOO_NNNN, it restarts suspended output.
  142.  
  143.           If _a_c_t_i_o_n if _TTTT_CCCC_IIII_OOOO_FFFF_FFFF, the system transmits a STOP character, which
  144.           causes the terminal device to stop transmitting data to the system.
  145.  
  146.           If _a_c_t_i_o_n is _TTTT_CCCC_IIII_OOOO_NNNN, the system transmits a START character, which
  147.           causes the terminal device to start transmitting data to the system.
  148.  
  149.    GGGGeeeetttt aaaannnndddd SSSSeeeetttt BBBBaaaauuuudddd RRRRaaaatttteeee
  150.      The baud rate functions get and set the values of the input and output
  151.      baud rates in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure.  The effects on the terminal device
  152.      described below do not become effective until the _tttt_cccc_ssss_eeee_tttt_aaaa_tttt_tttt_rrrr function is
  153.      successfully called.
  154.  
  155.      The input and output baud rates are stored in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure.  The
  156.      speed_t values passed to and returned from these functions are integral
  157.      values directly containing the desired rate in bits per second.  The
  158.      integer 38400, for example, represents 38400 bps.  Exactly which values
  159.      are supported depends on the type of hardware; see _s_e_r_i_a_l(_7) for more
  160.      information.  The _tttt_cccc_ssss_eeee_tttt_aaaa_tttt_tttt_rrrr function will return _EEEE_IIII_NNNN_VVVV_AAAA_LLLL if the specified
  161.      rate is not supported by the hardware.  The names in this table represent
  162.      common rates, and are defined for convenience in _<<<<_tttt_eeee_rrrr_mmmm_iiii_oooo_ssss_...._hhhh>.
  163.  
  164.                    Name     Description       Name    Description
  165.                   _______________________________________________
  166.                   _BBBB_0000            Hang up      _BBBB_6666_0000_0000        600 baud
  167.                   _BBBB_5555_0000           50 baud      _BBBB_1111_2222_0000_0000      1200 baud
  168.                   _BBBB_7777_5555           75 baud      _BBBB_1111_8888_0000_0000      1800 baud
  169.                   _BBBB_1111_1111_0000         110 baud      _BBBB_2222_4444_0000_0000      2400 baud
  170.                   _BBBB_1111_3333_4444       134.5 baud      _BBBB_4444_8888_0000_0000      4800 baud
  171.                   _BBBB_1111_5555_0000         150 baud      _BBBB_9999_6666_0000_0000      9600 baud
  172.                   _BBBB_2222_0000_0000         200 baud      _BBBB_1111_9999_2222_0000_0000    19200 baud
  173.                   _BBBB_3333_0000_0000         300 baud      _BBBB_3333_8888_4444_0000_0000    38400 baud
  174.                   _BBBB_5555_7777_6666_0000_0000     57600 baud      _BBBB_7777_6666_8888_0000_0000    76800 baud
  175.                   _BBBB_1111_1111_5555_2222_0000_0000   115200 baud
  176.  
  177.      _cccc_ffff_gggg_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd gets the output baud rate stored in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure
  178.      pointed to by _t_e_r_m_i_o_s__p.
  179.  
  180.      _cccc_ffff_ssss_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd sets the output baud rate stored in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure
  181.      pointed to by _t_e_r_m_i_o_s__p to _s_p_e_e_d.  The zero baud rate, _BBBB_0000, is used to
  182.      terminate the connection.  If _BBBB_0000 is specified, the modem control lines
  183.      are no longer asserted.  Normally, this disconnects the line.
  184.  
  185.  
  186.  
  187.  
  188.                                                                         PPPPaaaaggggeeee 3333
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. tttteeeerrrrmmmmiiiioooossss((((3333tttt))))                                                        tttteeeerrrrmmmmiiiioooossss((((3333tttt))))
  196.  
  197.  
  198.  
  199.      _cccc_ffff_gggg_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd gets the input baud rate and stores it in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss
  200.      structure pointed to by _t_e_r_m_i_o_s__p.
  201.  
  202.      _cccc_ffff_ssss_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd sets the input baud rate stored in the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure
  203.      pointed to by _t_e_r_m_i_o_s__p to _s_p_e_e_d.  If the input baud rate is set to zero,
  204.      the input baud rate is specified by the value of the output baud rate.
  205.      Both _cccc_ffff_ssss_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd and _cccc_ffff_ssss_eeee_tttt_oooo_ssss_pppp_eeee_eeee_dddd return a value of zero if successful and
  206.      -1 to indicate an error.  Attempts to set unsupported baud rates are
  207.      ignored.  This refers both to changes to baud rates not supported by the
  208.      hardware, and to changes setting the input and output baud rates to
  209.      different values if the hardware does not support this.
  210.  
  211.    GGGGeeeetttt aaaannnndddd SSSSeeeetttt TTTTeeeerrrrmmmmiiiinnnnaaaallll FFFFoooorrrreeeeggggrrrroooouuuunnnndddd PPPPrrrroooocccceeeessssssss GGGGrrrroooouuuupppp IIIIDDDD
  212.      _tttt_cccc_ssss_eeee_tttt_pppp_gggg_rrrr_pppp sets the foreground process group ID of the terminal specified
  213.      by _f_i_l_d_e_s to _p_g_i_d.  The file associated with _f_i_l_d_e_s must be the
  214.      controlling terminal of the calling process and the controlling terminal
  215.      must be currently associated with the session of the calling process.
  216.      _p_g_i_d must match a process group ID of a process in the same session as
  217.      the calling process.
  218.  
  219.      _tttt_cccc_gggg_eeee_tttt_pppp_gggg_rrrr_pppp returns the foreground process group ID of the terminal
  220.      specified by _f_i_l_d_e_s.  _tttt_cccc_gggg_eeee_tttt_pppp_gggg_rrrr_pppp is allowed from a process that is a
  221.      member of a background process group; however, the information may be
  222.      subsequently changed by a process that is a member of a foreground
  223.      process group.
  224.  
  225.    GGGGeeeetttt TTTTeeeerrrrmmmmiiiinnnnaaaallll SSSSeeeessssssssiiiioooonnnn IIIIDDDD
  226.      _tttt_cccc_gggg_eeee_tttt_ssss_iiii_dddd returns the session ID of the terminal specified by _f_i_l_d_e_s.
  227.  
  228. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  229.      On success, _tttt_cccc_gggg_eeee_tttt_pppp_gggg_rrrr_pppp returns the process group ID of the foreground
  230.      process group associated with the specified terminal.  Otherwise, it
  231.      returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to indicate the error.
  232.  
  233.      On success, _tttt_cccc_gggg_eeee_tttt_ssss_iiii_dddd returns the session ID associated with the specified
  234.      terminal.  Otherwise, it returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to indicate the error.
  235.  
  236.      On success, _cccc_ffff_gggg_eeee_tttt_iiii_ssss_pppp_eeee_eeee_dddd returns the input baud rate from the _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss
  237.      structure.
  238.  
  239.      On success, cfgetospeed returns the output baud rate from the termios
  240.      structure.
  241.  
  242.      On success, all other functions return a value of 0.  Otherwise, they
  243.      return -1 and set _eeee_rrrr_rrrr_nnnn_oooo to indicate the error.
  244.  
  245.      All of the functions fail if one of more of the following is true:
  246.  
  247.      _EEEE_BBBB_AAAA_DDDD_FFFF          The _f_i_l_d_e_s argument is not a valid file descriptor.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.                                                                         PPPPaaaaggggeeee 4444
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. tttteeeerrrrmmmmiiiioooossss((((3333tttt))))                                                        tttteeeerrrrmmmmiiiioooossss((((3333tttt))))
  262.  
  263.  
  264.  
  265.      _EEEE_NNNN_OOOO_TTTT_TTTT_YYYY         The file associated with _f_i_l_d_e_s is not a terminal.
  266.  
  267.      _tttt_cccc_ssss_eeee_tttt_aaaa_tttt_tttt_rrrr also fails if the following is true:
  268.  
  269.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         The _o_p_t_i_o_n_a_l__a_c_t_i_o_n_s argument is not a proper value, or an
  270.                     attempt was made to change an attribute represented in the
  271.                     _tttt_eeee_rrrr_mmmm_iiii_oooo_ssss structure to an unsupported value.
  272.  
  273.      _tttt_cccc_ssss_eeee_nnnn_dddd_bbbb_rrrr_eeee_aaaa_kkkk also fails if the following is true:
  274.  
  275.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         The device does not support the _tttt_cccc_ssss_eeee_nnnn_dddd_bbbb_rrrr_eeee_aaaa_kkkk function.
  276.  
  277.      _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn also fails if one or more of the following is true:
  278.  
  279.      _EEEE_IIII_NNNN_TTTT_RRRR          A signal interrupted the _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn function.
  280.  
  281.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         The device does not support the _tttt_cccc_dddd_rrrr_aaaa_iiii_nnnn function.
  282.  
  283.      _tttt_cccc_ffff_llll_uuuu_ssss_hhhh also fails if the following is true:
  284.  
  285.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         The device does not support the _tttt_cccc_ffff_llll_uuuu_ssss_hhhh function or the
  286.                     _q_u_e_u_e__s_e_l_e_c_t_o_r argument is not a proper value.
  287.  
  288.      _tttt_cccc_ffff_llll_oooo_wwww also fails if the following is true:
  289.  
  290.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         The device does not support the _tttt_cccc_ffff_llll_oooo_wwww function or the
  291.                     _a_c_t_i_o_n argument is not a proper value.
  292.  
  293.      _tttt_cccc_gggg_eeee_tttt_pppp_gggg_rrrr_pppp also fails if the following is true:
  294.  
  295.      _EEEE_NNNN_OOOO_TTTT_TTTT_YYYY         the calling process does not have a controlling terminal,
  296.                     or _f_i_l_d_e_s does not refer to the controlling terminal.
  297.  
  298.      _tttt_cccc_ssss_eeee_tttt_pppp_gggg_rrrr_pppp also fails if the following is true:
  299.  
  300.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         _p_g_i_d is not a valid process group ID .
  301.  
  302.      _EEEE_NNNN_OOOO_TTTT_TTTT_YYYY         the calling process does not have a controlling terminal,
  303.                     or _f_i_l_d_e_s does not refer to the controlling terminal, or
  304.                     the controlling terminal is no longer associated with the
  305.                     session of the calling process.
  306.  
  307.      _EEEE_PPPP_EEEE_RRRR_MMMM          _p_g_i_d does not match the process group of an existing
  308.                     process in the same session as the calling process.
  309.  
  310.      _tttt_cccc_gggg_eeee_tttt_ssss_iiii_dddd also fails if the following is true:
  311.  
  312.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS         _f_i_l_d_e_s is a terminal that is not allocated to a session.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.                                                                         PPPPaaaaggggeeee 5555
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. tttteeeerrrrmmmmiiiioooossss((((3333tttt))))                                                        tttteeeerrrrmmmmiiiioooossss((((3333tttt))))
  328.  
  329.  
  330.  
  331. SEE ALSO
  332.      _ssss_eeee_tttt_ssss_iiii_dddd(2), _ssss_eeee_tttt_pppp_gggg_iiii_dddd(2), _tttt_eeee_rrrr_mmmm_iiii_oooo(7), _ssss_eeee_rrrr_iiii_aaaa_llll(7)
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.                                                                         PPPPaaaaggggeeee 6666
  387.  
  388.  
  389.  
  390.